<template>
    <view>
        <template v-for="(item, index) in CameraParamList">
            <j-cell-group :key="index">
                <j-cell-card :title="'通道' + index" :show="false" :is-touch="false" border style="background: #f5f7fb">
                    <j-cell title="AeSensitivity" :tips="item.AeSensitivity" :more="false"></j-cell>
                    <j-cell title="ApertureMode" :tips="item.ApertureMode" :more="false"></j-cell>
                    <j-cell title="BLCMode" :tips="item.BLCMode" :more="false"></j-cell>
                    <j-cell title="DayNightColor" :tips="item.DayNightColor" :more="false"></j-cell>
                    <j-cell title="Day_nfLevel" :tips="item.Day_nfLevel" :more="false"></j-cell>
                    <j-cell title="DncThr" :tips="item.DncThr" :more="false"></j-cell>
                    <j-cell title="ElecLevel" :tips="item.ElecLevel" :more="false"></j-cell>
                    <j-cell title="EsShutter" :tips="item.EsShutter" :more="false"></j-cell>

                    <j-cell-card title="ExposureParam" :show="false" :is-touch="false" border style="background: #f5f7fb">
                        <j-cell title="LeastTime" :tips="item.ExposureParam.LeastTime" :more="false"></j-cell>
                        <j-cell title="Level" :tips="item.ExposureParam.Level" :more="false"></j-cell>
                        <j-cell title="MostTime" :tips="item.ExposureParam.MostTime" :more="false"></j-cell>
                    </j-cell-card>
                    <j-cell-card title="GainParam" :show="false" :is-touch="false" border style="background: #f5f7fb">
                        <j-cell title="AutoGain" :tips="item.GainParam.AutoGain" :more="false"></j-cell>
                        <j-cell title="Gain" :tips="item.GainParam.Gain" :more="false"></j-cell>
                    </j-cell-card>

                    <j-cell title="IRCUTMode" :tips="item.IRCUTMode" :more="false"></j-cell>
                    <j-cell title="InfraredSwap" :tips="item.InfraredSwap" :more="false"></j-cell>
                    <j-cell title="IrcutSwap" :tips="item.IrcutSwap" :more="false"></j-cell>
                    <j-cell title="Night_nfLevel" :tips="item.Night_nfLevel" :more="false"></j-cell>
                    <j-cell title="PictureFlip" :tips="item.PictureFlip" :more="false"></j-cell>
                    <j-cell title="PictureMirror" :tips="item.PictureMirror" :more="false"></j-cell>
                    <j-cell title="RejectFlicker" :tips="item.RejectFlicker" :more="false"></j-cell>
                    <j-cell title="WhiteBalance" :tips="item.WhiteBalance" :more="false"></j-cell>
                </j-cell-card>
            </j-cell-group>
        </template>
    </view>
</template>

<script>
export default {
    data() {
        return {
            token: '',
            CameraParamList: []
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        console.log(options);
		this.token = options.token
		this.getconfig();
	},
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        getconfig() {
            uni.showLoading();
            let token = this.token;
            let data = {
                Name: 'Camera.Param'
            };
            getApp().globalData.api.getconfig(data, token, (result) => {
                uni.hideLoading({
                    success: (res) => {
                        console.log(result);
                        this.CameraParamList = result['Camera.Param']
                    }
                });
            });
        }
    }
};
</script>
<style></style>
